<template>
  <div class="container">
    <div class="xq">
      <a href="javascript:;" style="display: block;height: 200px;background: url(/img/xiangqing.gif) no-repeat center;" class="xqlba">
      </a>
      <section class="zxsc2 af">
        <div class="left">
          <p class="wz">当前位置：<router-link to="/">首页</router-link> > <router-link to="/Info">行业资讯</router-link> > {{title.xxq.currentArticle?title.xxq.currentArticle.keyword:''}}</p>
          <div class="xqtop">
            <h3>{{title.xxq.currentArticle?title.xxq.currentArticle.title:''}}</h3>
            <div class="ctdb">
              <span class="house">来源：中海启航集团</span>
              <em>阅读量：{{title.xxq.currentArticle?title.xxq.currentArticle.readnum:''}}</em>
              <i>时间：{{title.xxq.currentArticle?title.xxq.currentArticle.createtime:''}}</i>
              <div  v-html="title.msg2?title.msg2:'<p>  暂无数据<p>'" class="dbct">
              </div>
            </div>
            <div class="xqbt af">
              <div class="left">
                <a href="javascript:;" class="syp" @click="qh(title.xxq.upArticle.id,title.xxq.upArticle.title)">上一篇：{{title.xxq.upArticle.title?title.xxq.upArticle.title:'没有了~'}}</a><br/>
                <a href="javascript:;" class="xyp" @click="qh(title.xxq.downArticle.id,title.xxq.downArticle.title)">下一篇：{{title.xxq.downArticle.title?title.xxq.downArticle.title:'没有了~'}}</a>
              </div>
            </div>
          </div>
        </div>
        <div class="rt">
          <a href="javascript:;" class="zxgg1 zxgg"></a>
          <a href="javascript:;" class="zxgg2 zxgg"></a>
          <a href="javascript:;" class="zxgg3 zxgg"></a>
        </div>
      </section>
    </div>
    <my-ft></my-ft>
  </div>

</template>
<script>
  import axios from 'axios';
  import $ from 'jquery';
  export default {
    name: 'HelloWorld',
    data () {
      return {
        selenv:false,
        title:null,
        yqljData:null,
        pageName: 'loading',
        msg2:'',
        dlzt:'',
        swiperSlides: [1, 2, 3, 4, 5, 6],
        fuwu:1,
        title:null,
        sjsz:[],
      }
    },
    async asyncData ({ params }) {
    let nh2 = await axios.get(`https://exam.zhonghaiqihang.com/PInterface/Header/headerData`);
    let nh4 = await axios.get(`https://exam.zhonghaiqihang.com/PInterface/BusinessRange/articleDetailsData`,{
      params:{
        articleid:params.id
      }});
    let nhh =nh4.data.currentArticle? nh4.data.currentArticle.content:'';
    let nhh1 = '' +nhh;
    function unescape(html){
      return html
        .replace(html ? /&(?!#?\w+;)/g : /&/g, '&amp;')
        .replace(/&lt;/g, "<")
        .replace(/&gt;/g, ">")
        .replace(/&quot;/g, "\"")
        .replace(/&#39;/g, "\'")
        .replace(/\/UEditOR/g, 'https://exam.zhonghaiqihang.com/UEditOR')
    }
    var nhh2= unescape(nhh1);
    let data  = {nav:nh2.data,id:params.id,msg2:nhh2,xxq:nh4.data
    };
    return { title: data}
  },
  head () {
    return {
      title: this.title.xxq.currentArticle?this.title.xxq.currentArticle.title+'-企业邦':'企业邦',
      meta: [
        { hid: 'description', name: 'description', content:this.title.xxq.currentArticle? this.title.xxq.currentArticle.summary :''},
        { hid: 'keywords', name: 'keywords', content:this.title.xxq.currentArticle?this.title.xxq.currentArticle.keyword:''}
      ]
    }
  },
  mounted: function () {
    let a = document.cookie;
    console.log(this.title);
    let cookie = '';
    if(a.indexOf('userinfoRes')!=-1){
      let b = a.split('userinfoRes=');
      let c = b[1].split(';');
      cookie = c[0];
    }
    this.dlzt = cookie;
    
    $('th').css("border",'1px solid #cccccc')
    $('td').css("border",'1px solid #cccccc')
  
    
  },
  methods:{
    tzdh:function(e){
      this.$router.push('/'+e);
    },
    qh:function(e,e2) {
      var _this = this;
      if (e2 != undefined) {
        const new1 = this.$router.push('/ScopeDetails/'+e);
      }

    }
  }
  }


</script>

<style type="text/css" scoped="">

</style>
